package com.security.manage.user.repository;

import com.security.manage.user.model.UsbKey;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface UsbKeyRepository extends JpaRepository<UsbKey,Long> {

    @Query(nativeQuery = true,value = "select uk.id,uk.sn_code name from usb_key uk left join user u on uk.sn_code=u.usb_key where u.usb_key is null")
    List<Object[]> getNoBoundUsbKey();

}
